{include file='common/head'}
<style>
    .imgs{width:80px;height: 80px;margin-left:10px}
</style>
<body>
<div class="x-body">
    <form class="layui-form" method="post"  enctype="multipart/form-data" action="">

        <div class="layui-form-item">
            <label class="layui-form-label">银行卡</label>
            <div class="layui-input-inline">
                <input type="text" name="blank"  autocomplete="off" class="layui-input" value="{$set.blank}">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">微信</label>
            <div class="layui-input-inline">
                <input type="text" name="weiin"  autocomplete="off" class="layui-input" value="{$set.weixin}">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">支付宝</label>
            <div class="layui-input-inline">
                <input type="text" name="zhifubao"  autocomplete="off" class="layui-input" value="{$set.zhifubao}">
            </div>
        </div>
        <div class="layui-form-item">
            <label for="L_repass" class="layui-form-label">
            </label>
            <button  class="layui-btn" lay-filter="sub" lay-submit="" >
                确认
            </button>
        </div>
    </form>
</div>

<script src="__STATIC__/lib/layui/layui.js"></script>
<script src="__STATIC__/js/jquery-3.3.1.min.js"></script>
<script>
    layui.use(['form','layer'], function(){
        $ = layui.jquery;
        var form = layui.form
            ,layer = layui.layer;
        //监听提交
        form.on('submit(sub)', function(data){
            $.ajax({
                type: "post",
                async:false,
                url: "{:url('admin/setup/index')}",
                data: data.field,
                success:function(msg){
                    if(msg==1){
                        layer.msg('成功',{icon:1,time:2000});
                        //发异步，把数据提交给php
                        // layer.alert("修改成功", {icon: 6},function () {
                        //     // 获得frame索引
                        //     var index = parent.layer.getFrameIndex(window.name);
                        //     //关闭当前frame
                        //     parent.layer.close(index);
                        // });
                        //window.layer.close(index);//刷新父级窗口
                    }else{
                        layer.msg('未修改',{icon:1,time:1000});
                    }
                }
            })
            return false;
        });
    });
</script>

</body>

</html>